<UserControl x:Class="ClientUI.ViewModel.CardRegView" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:cal="http://www.caliburnproject.org"
             xmlns:behaviors="clr-namespace:Client.Behaviors;assembly=Client"
             xmlns:converters="clr-namespace:Client.Converters;assembly=Client"
             Height="610" 
             Width="900">

    <UserControl.Resources>
        <converters:MemberConverter x:Key="MemberConverter" />
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"/>
            <RowDefinition Height="300"/>
            <RowDefinition Height="100"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="50"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="50"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Barcode :" Grid.Row="0" Grid.Column="1" Style="{StaticResource TextBlockStyle}" Width="114" VerticalAlignment="Center" />
        <TextBox x:Name="Barcode" Grid.Row="0" Grid.Column="1" Style="{StaticResource TextBoxStyle}" Width="150" Margin="130,0,0,0" VerticalAlignment="Center" Visibility="{Binding IsInputVisible}" cal:Message.Attach="[Event KeyDown] = [Action BarcodeKeyDown($eventArgs)]" >
            <i:Interaction.Behaviors>
                <behaviors:FocusBehavior HasInitialFocus="True" IsFocused="{Binding IsBarcodeFocused, Mode=TwoWay}"/>
                <behaviors:SelectAllTextOnFocusBehavior />
            </i:Interaction.Behaviors>
        </TextBox>
        <FlowDocumentScrollViewer Grid.Row="1" Grid.Column="1" Document="{Binding Path=Item, Converter={StaticResource MemberConverter}, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" Width="800" Style="{StaticResource FlowDocLabelStyle}" />
        <TextBlock x:Name="Message" Grid.Row="2" Grid.Column="1" Style="{StaticResource MessageBlockStyle}" Text="Choose your options" Width="800" />
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="3" Grid.Column="1">
            <Button x:Name="Show" Content="Show" Template="{StaticResource ButtonTemplate}" />
            <Button x:Name="RegIt" Content="Reg" Template="{StaticResource ButtonTemplate}" />
            <Button x:Name="Exit" Content="Exit" Template="{StaticResource ButtonTemplate}" />
        </StackPanel>
    </Grid>
</UserControl>